<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>JavaScript数据类型</title>
</head>

<body>
    <script>
        var length = 16;    //Number 通过数字字面量赋值
        var points = x * 10;    //Number 通过表达式字面量赋值
        var lastName = "Johnson";   //String 通过字符串字面量赋值
        var cars = ["Saab", "Volvo", "BMW"];    //Array 通过数组字面量赋值
        var person = { firstName: "John", lastName: "Doe" };    //Object 通过对象字面量赋值
    </script>
</body>

</html>